package com.example.drug.controller;

import com.example.drug.util.AjaxResult;
import com.example.drug.util.BizException;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "ID异常测试609余函池")
@RestController
@RequestMapping("/api/exception")
public class ExceptionController {

    @ApiOperation("ID业务异常测试")
    @GetMapping("/test")
    public AjaxResult exception() {
        throw new BizException(404, "没找到");
    }
}